# -*- coding: utf-8 -*-
# @Time    : 2022/5/25 0:24
# @Author  : zhangping
# @Email   : 2432115515@qq.com
# @File    : stockout_description_page.py
# @Software: PyCharm
"""
缺货登记页面
"""
from selenium.webdriver.common.by import By
from page.base_page import BasePage

class StockoutDescriptionPage(BasePage):
    # def __init__(self,driver):
    #     self.driver=driver
    # 订单描述定位器
    ele_description_locator = (By.CSS_SELECTOR,
                                   "body > div.block.clearfix > div.AreaR > div > div > div > form > table > tbody > tr:nth-child(3) > td:nth-child(2) > textarea")
    # 提交缺货登记按钮定位器
    ele_submit_description_locator = (By.NAME, "submit")

    def input_description(self):
        self.driver.find_element(*self.ele_description_locator).send_keys("缺货")
    def submit_btn(self):
        self.driver.find_element(*self.ele_submit_description_locator).click()
    #汇总提交缺货登记
    def submit_description(self):
        self.input_description()
        self.submit_btn()

